package client.gui.panels;

import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

import controllers.ControllerIF;

public class ChooseInspector extends JPanel implements PanelIF, ActionListener {
	private JButton send_btn;
	private JComboBox comboBox;
	private JPanel panel_1;
	
	public ChooseInspector() {
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		
		Component verticalStrut_2 = Box.createVerticalStrut(20);
		add(verticalStrut_2);
		
		panel_1 = new JPanel();
		panel_1.setSize(100, 200);
		add(panel_1);
		panel_1.setLayout(new BoxLayout(panel_1, BoxLayout.X_AXIS));
		
		Component horizontalStrut_3 = Box.createHorizontalStrut(200);
		panel_1.add(horizontalStrut_3);
		
		JLabel lblChooseInspector = new JLabel("Choose inspector:");
		lblChooseInspector.setFont(new Font("Arial", Font.BOLD, 12));
		panel_1.add(lblChooseInspector);
		
		Component horizontalStrut_5 = Box.createHorizontalStrut(20);
		panel_1.add(horizontalStrut_5);
		
		comboBox = new JComboBox();
		comboBox.setMaximumSize(new Dimension(150,20));
		comboBox.addItem("");
		comboBox.addItem("1");
		comboBox.addItem("2");
		comboBox.addItem("3");
		panel_1.add(comboBox);
		
		Component horizontalStrut_4 = Box.createHorizontalStrut(160);
		panel_1.add(horizontalStrut_4);
		
		Component verticalStrut_1 = Box.createVerticalStrut(20);
		add(verticalStrut_1);
		
		JPanel panel_2 = new JPanel();
		add(panel_2);
		panel_2.setLayout(new BoxLayout(panel_2, BoxLayout.X_AXIS));
		
		send_btn = new JButton("Send");
		send_btn.addActionListener(this);
		panel_2.add(send_btn);
		
		Component verticalStrut_3 = Box.createVerticalStrut(100);
		add(verticalStrut_3);
	}


	@Override
	public void actionPerformed(ActionEvent e) {
		
		if(e.getSource().equals(send_btn)) {
			System.out.println("senddddddd");
			}		
	}

	@Override
	public void setController(ControllerIF cif) {
		// TODO Auto-generated method stub
		
	}
}
